package com.fhz.day004.utils

import android.util.Log

/**
 * 时间:2021/10/18
 * @author msfeng
 * 简述: TODO
 */
object LogUtil {
    private const val VERBOSE = 0
    private const val DEBUG = 1
    private const val INFO = 2
    private const val WARN = 3
    private const val ERROR = 4

    var level = INFO

    fun v(t:String,m:String){
        if(level <= VERBOSE){
            Log.v(t,m)
        }
    }

    fun d(t:String,m:String){
        if(level <= DEBUG){
            Log.d(t,m)
        }
    }
    fun i(t:String,m:String){
        if(level <= INFO){
            Log.i(t,m)
        }
    }
    fun w(t:String,m:String){
        if(level <= WARN){
            Log.w(t,m)
        }
    }

    fun e(t:String,m:String){
        if(level <= ERROR){
            Log.e(t,m)
        }
    }
}